<?php

namespace App\Livewire\Components;

use App\Models\Action;
use Livewire\Component;
use Livewire\WithPagination;

class ActionList extends Component
{
    use WithPagination;

    public function render()
    {
        $actions = Action::query()
            ->with('user')
            ->orderByDesc('id')
            ->paginate(10);
        return view('livewire.components.action-list', [
            'actions' => $actions
        ]);
    }
}
